package com.itheima.test02;

import java.util.Scanner;

public class Test_A {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int i = sc.nextInt();
        int number = getNumber(i);
        System.out.println(number);
    }

    private static int getNumber(int i) {
        if (i <= 9) {
            return i;
        }
        String s = "";
        if (i > 10) {
            s += getNumber(i / 10) + "";
        }
        return Integer.parseInt((i % 10) + s);
    }
}

